<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>第53个CSS页面</title>
</head>
<body>
<p>多个相邻的margin的折叠外边距计算</p>

<div style="margin:50px 0; background-color:red; width:50px;">
    <div style="margin:-60px 0;">
        <div style="margin:150px 0;">A</div>
    </div>
</div>

<div style="margin:-100px 0; background-color:green; width:50px;">
    <div style="margin:-120px 0;">
        <div style="margin:200px 0;">B</div>
    </div>
</div>
</body>
</html>